﻿
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
namespace WinnerCMS.Model
{
    /// <summary>
    /// 用户
    /// </summary>
    public partial class User
    {
        public User()
        {
            Roles = new List<Role>();
            UserAddresses = new List<UserAddress>();
            Rights = new List<Right>();
            Business = new List<Business>();
            CategoryForPermission = new List<Category>();
        }
        /// <summary>
        /// Id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [Index()]
        public string UserName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string PassWord { get; set; }
        /// <summary>
        /// 最后登录IP
        /// </summary>
        public string LastLoginIP { get; set; }
        /// <summary>
        /// 最后登录时间
        /// </summary>
        public System.DateTime? LastLoginTime { get; set; }
        /// <summary>
        /// 登录次数
        /// </summary>
        public int LoginTimes { get; set; }
        /// <summary>
        /// 是否管理员
        /// </summary>
        [Index]
        public bool IsAdmin { get; set; }
        /// <summary>
        /// 主页
        /// </summary>
        public string HomePage { get; set; }
        /// <summary>
        /// QQ
        /// </summary>
        public string QQ { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        public string PetName { get; set; }
        /// <summary>
        /// 自我介绍
        /// </summary>
        public string Introduce { get; set; }
        /// <summary>
        /// 电邮
        /// </summary>
        public string EMail { get; set; }
        /// <summary>
        /// 电子货币
        /// </summary>
        public int Coin { get; set; }
        /// <summary>
        /// 点数
        /// </summary>
        public int Point { get; set; }
        /// <summary>
        /// 经验积分
        /// </summary>
        public int Experience { get; set; }
        /// <summary>
        /// 到期
        /// </summary>
        public System.DateTime? Mature { get; set; }
        /// <summary>
        /// 密码问题
        /// </summary>
        public string Question { get; set; }
        /// <summary>
        /// 密码答案
        /// </summary>
        public string Answer { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public byte Sex { get; set; }
        /// <summary>
        /// 计费方式
        /// </summary>
        public byte ActiveType { get; set; }
        /// <summary>
        /// 注册时间
        /// </summary>
        public System.DateTime RegTime { get; set; }
        /// <summary>
        /// 是否锁定
        /// </summary>
        public int IsLocked { get; set; }
        /// <summary>
        /// 真名
        /// </summary>
        public string TrueName { get; set; }
        /// <summary>
        /// Msn
        /// </summary>
        public string Msn { get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        public string Birthday { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public string Province { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string City { get; set; }
        /// <summary>
        /// Icq
        /// </summary>
        public string Icq { get; set; }
        /// <summary>
        /// Yahoo
        /// </summary>
        public string Yahoo { get; set; }
        /// <summary>
        /// Skype
        /// </summary>
        public string Skype { get; set; }
        /// <summary>
        /// Location
        /// </summary>
        public string Location { get; set; }
        /// <summary>
        /// 身份证
        /// </summary>
        public string IdCard { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        public string Mobile { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; }


        public virtual ICollection<Role> Roles { get; set; }
        public virtual ICollection<UserAddress> UserAddresses { get; set; }
        public virtual ICollection<Right> Rights { get; set; }

        public virtual ICollection<Business> Business { get; set; }

        /// <summary>
        /// 真正栏目权限
        /// </summary>
        public virtual ICollection<Category> CategoryForPermission { get; set; }

        /// <summary>
        ///验证码
        /// </summary>
        [NotMapped]
        public string PassCode { get; set; }
    }
}